<%--
<%@ page import="dao.UserDao" %>
<%@ page import="dao.impl.UserDaoImpl" %>
<%@ page import="entity.User" %>
<%@ page import="service.UserService" %>
<%@ page import="service.impl.UserServiceImpl" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>登录处理页面</title>
</head>
<body>
    <%
        //设置解码方式
        request.setCharacterEncoding("utf-8");
        //获取值
        String name=request.getParameter("userId"); //账号
        String pwd=request.getParameter("passWord"); //密码

        //创建用户的数据访问对象
        UserService userService=new UserServiceImpl();
        User user=userService.login(name,pwd);

        //判断
        if (user!=null){
          session.setAttribute("user",user);
          session.setMaxInactiveInterval(15*60);

    %>

<script>
    alert("登录成功！")
    window.location="blog_control.jsp?opr=HomeBlogList";
</script>

<%
    }else {

%>
<script>
    alert("账号或密码输入错误！请重新输入！")
    window.location="../pages/login.jsp"
</script>

<%
    }
%>
</body>
</html>
--%>
